def main():
    y_or_n = input("是否退出程序（退出请输入yes，否则输入no）？")
    while (y_or_n != "yes"):
        gender = input("性别：")
        # print(type(gender))
        weight = float(input("体重（kg）："))
        # print(type(weight))
        height = float(input("身高（cm）："))
        # print(type(height))
        age = int(input("年龄："))
        # print(type(age))

        if gender == "男":
            gmr = 13.7 * weight + 5.0 * height - 6.8 * age + 66
        elif gender == "女":
            gmr = 9.6 * weight + 3.8 * height - 4.7 * age + 655
        else:
            gmr = -1
        if gmr != -1:
            print("基础代谢率（大卡）：", gmr)
        else:
            print("暂不支持该性别！")
        print()  # 输出空行
        y_or_n = input("是否退出程序（退出请输入yes）？")


if __name__ == "__main__":
    main()

